// +----------------------------------------------------------------------
// | 物流服务api请求
// +----------------------------------------------------------------------

import request from "@/utils/request.js";

/**
 * 举例get请求
 * 物流历史记录
 * @param int id
 * 
 */
export function logisticsRecords(id) {
	return request.get('logistics/logisticsRecords?users_id=' + id, {}, {
		noAuth: true
	});
}


/**
 * 举例get请求
 * 物流记录清空
 * @param int id
 * 
 */
export function logisticsRecordsEmpty(id) {
	return request.get('logistics/logisticsRecordsEmpty?users_id=' + id, {}, {
		noAuth: true
	});
}

/**
 * 举例get请求
 * 热门城市
 * @param int id
 * 
 */
export function popularCities() {
	return request.get('logistics/popularCities' , {}, {
		noAuth: true
	});
}

/**
 * 举例get请求
 * 物流城市
 * @param int id
 * 
 */
export function logisticsCity(search) {
	return request.get('logistics/logisticsCity?search=' + search , {}, {
		noAuth: true
	});
}

/**
 * 举例get请求
 * 物流运费
 * @param int id
 * 
 */
export function logisticsFreight(id,start_id,end_id) {
	return request.get('logistics/logisticsFreight?users_id=' + id  + '&start_id=' + start_id + '&end_id=' + end_id, {}, {
		noAuth: true
	});
}

/**
 * 举例get请求
 * 物流公司详情
 * @param int id
 * logistics/logisticsCompanyDetails?id=EC88F15B-65A2-55A0-136C-24CC80370304
 */

export function logisticsCompanyDetails(id) {
	return request.get('logistics/logisticsCompanyDetails?id=' + id, {}, {
		noAuth: true
	});
}


/**
 * 举例post请求
 * 用户发送验证码
 * @param data object 用户手机号
 */
export function registerVerify(data) {
	return request.post("register/verify", data, {
		noAuth: true
	});
}

